﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 **/

using System;
using System.ComponentModel;

namespace Peter.Common.Interfaces
{
   /// <summary>
   /// Interface for the peter options.
   /// </summary>
   public interface IPeterOptions
   {
      /// <summary>
      /// Gets if the options have been loaded or not.
      /// </summary>
      bool IsLoaded { get; }

      /// <summary>
      /// Occurs when the options are loaded.
      /// </summary>
      event EventHandler Loaded;

      /// <summary>
      /// Event rasied when the editor options are changed.
      /// </summary>
      event PropertyChangedEventHandler EditorOptionsChanged;

      /// <summary>
      /// Gets the options page with the given name.
      /// </summary>
      /// <param name="pageName">Name of option page to get.</param>
      /// <returns>The requested option page, null if non-existant.</returns>
      IOptionPage GetOptionPage (string pageName);

      /// <summary>
      /// Save the current options.
      /// </summary>
      void Save ();

      /// <summary>
      /// Gets the option data with the given name.
      /// </summary>
      /// <param name="dataName">Name of option data.</param>
      /// <returns>The requested option data.</returns>
      IOptionData GetOptionData (string dataName);
   }
}
